<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Stages extends CI_Controller {

		function __construct()
	{
		parent::__construct();
		$this->load->library('ion_auth');
		$this->load->library('session');
		$this->load->library('form_validation');
		$this->load->database();
		$this->load->helper(array('url','language'));
    $this->lang->load('general');
    $this->load->model('stages_model');
    $this->data['user'] = $this->ion_auth->user()->row();
	}

  function index()
  {

    $this->data['stages'] = $this->stages_model->get_all();
   
    
    $this->data['title'] = lang('stages');
    $this->data['view'] = 'stages/index';
    $this->load->view('template', $this->data);

  }

  function stage($stage_id)
  {
    $this->data['stage_ranking'] = $this->points_model->get_by_stage_id($stage_id);
    echo "<pre>";
    print_r($this->data['stage_ranking']);
    echo "</pre>";
  }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */